﻿namespace CN2P.ServiceModel.ServiceClients
{
    using System.Net;

    public class UnexpectedServiceResponseException : ServiceException
    {
        private readonly HttpStatusCode expectedCode;
        private readonly HttpStatusCode code;

        public UnexpectedServiceResponseException(HttpStatusCode expectedCode, HttpStatusCode code)
            : base("Expected response code " + expectedCode + " but was " + code)
        {
            this.expectedCode = expectedCode;
            this.code = code;
        }

        public HttpStatusCode ExpectedCode
        {
            get { return expectedCode; }
        }

        public HttpStatusCode Code
        {
            get { return code; }
        }
    }
}
